// next -> yiled后的表达式的值
// yield本身不产生返回值
// 但是yield可以赋值
function *foo(x) {
  var y = yield (x + 1)
  return y
}
var gen = foo(1)
console.log(gen.next()) // {value: 2, done: false}
console.log(gen.next()) // {value: undefined, done: false}




function *foo1(x) {
  var y = yield (x + 1)
  return y
}
var gen1 = foo1(1)
console.log(gen1.next()) // {value: 2, done: false}
console.log(gen1.next('12345')) // {value: '12345', done: false}